I have just posted this elsewhere actually!
It will take time... Not a long time, but it does take time. When I first started shaving my head, I was COVERED in razor burn all over my scalp - it's a sensitive area.
Give it maybe 2-3 weeks and you will be much happier with it, I promise. In the early stages though, make sure you're keeping it clean, and using an appropriate amount of moisturiser, perhaps with some aloe vera. Don't overuse it though, as this may clog pores and mean you get even more spots.
It's worth it, but I reckon there must be quite a few people that experience this pain.