Might not be the best way to train a dog, but illegal? I'd have to say "spanking" a dog would be a far cry from animal abuse. Immoral? Again, animal abuse, yes, spanking a dog, no. I'm also of the camp that a dog is a dog and that there are times when a dog does need phyical correction which might end up being a light tap, depending on the situation. Not that I have any special insight, good luck with your problem.
Andrew
Andrew