Does he like school, or is he resisting being there but knows he has to go because you say so? When my son gets conflicted, he hits.
It's hard to believe a tap from a teacher that he otherwise feels comfortable with would cause this reaction. In general, is she kind and sweet, and does he like her?