"Those who can only be forced by means of rods and blows come to no good; for even if hey seem to make improvement they will stay good only as long as the rod is on their backs."
Luther brings up some valid points in his statement. Forcing people to do things out of fear that they may be physically harmed is not the best way to reach people. Of course this idea is the doctrine of law which is important to teach to people, but once they become convicted through the law they should be allowed to hear the redeeming truth of the Gospel. This is the essential hinge of the idea of a separation of Law and Gospel.
So would Luther spank his kids. If he had kids it is my belief that he may have thought it a quick fix for an issue but not something to be permanent. Much the same way the Law came before the Gospel (which is the ultimate fix for redeeming us from sin). The Law serves a purpose when it is used correctly but it is important to use the Gospel as well. Back to whether it is right to spank kids as long as they are told how they are loved after then there is no fear that this is the only form of punishment.