I've owned dogs in the past, and I think you'll find that most dog owners are just as worried about their dog bothering you as you are of the dog bothering you. It's mortifying when your idiot labradors go bounding up to a child who is clearly afraid. The occasions when it happens and the "dont worry he wont bite" line is shouted is because the owner can probably see you're both acting defensively around their beloved mutt.
What can you do? All dogs on a lead at all times? Mass cull of all dogs? Sonic dog repellant? Sorry, but I thought that was hilarious. I can just imagine a poodle getting mentally tasered for straying within the exclusion zone.
Seems a bit much, doesn't it? Maybe we can work it out using languange and social norms. You know, like human beings.
Before he gets a complex, get your kid some dog time. And give him some simple rules to live by around dogs. Firstly, don't be afraid because the chance of a dog being dangerous is very slim. There are 7 million of the hairy idiots (dogs that is) in the UK, and of those around 3000 will hurt someone in any given year. Compare that to pretty much anything else, like driving for instance, and the odds are heavily in your favour that all will be fine.
Most dogs are happy-go-lucky morons more interested in sniffing at you and moving on than savaging your face off. If this wasn't the case, we wouldn't own them. Secondly, all he has to do is stand still and wait a few seconds for the owner to call their dog back. Dogs don't really care about people they don't know, they're just curious.
Finally, teach him the right way to handle petting a strange dog as it will help him overcome his fear if he knows what he's doing. Step one, ask the owner if you can pet the dog. Step two, hold your hand out in a fist for the dog to sniff, then you can pet him confidently and quite firmly. Little hands sneaking around the back of a dogs range of vision can be alarming for them just as it is for me when my daughter starts poking me in the eye.
Trust me it'll be worth it to get him past this stage. There is little more pathetic than an adult with an irrational fear of a pooch.