While parents want to protect their children and hate to see them unhappy, they may intervene so much that the child doesn't learn how to handle the situation, which is the best approach. However, since these children are physically attacking your child, it is important for you to talk to the teacher to get the full story of what is happening and work together on devising a solution.
In any case, you need to work on strategies with your son in order to "bullyproof" him. First of all, he should have a planned verbal response for when these boys or other children bully him. He needs to look them right in the eye and say in a loud voice things like: "Why are you kicking me?" or "Stop doing that, I don't like it." If this fails to stop the bullying, he can shout at them. This assertive approach usually works because it surprises bullies and draws attention to their actions. Help him rehearse this strategy many times so he feels comfortable using it.
Your son needs to develop some solid friendships with his classmates. Bullies are reluctant to attack children who have defenders. Since he is so shy, he will probably need your help. Invite a classmate over to play. It will definitely be easier for your son to get to know another child individually rather than in the classroom situation. Consider the idea of inviting one of the children who is actually bullying your son. Often, a bully is a child who is also being bullied by others, and in return picks on a weaker or shyer child like your son. In this way, you would be helping both children.
Finally, think of ways to build your child's self-confidence. Gaining a skill from karate to computing could help him become a more confident, resourceful child.