You are the first mom that I have heard other than me whose child was afraid of public toilets. Mine was afraid of the sound of the flushing because often it was so loud and it would flush automatically instead of with the handle that you could control when the flushing came.
The way we overcame her fear is to show her over and over the flushing, to get used to the sound and eventually she overcame the fear.
Ask your child what he is afraid of. Once you can identify it, go into a public toilet and show him he has nothing to be afraid of. It may not work immediately but eventually the fear will stop. Until the fear is gone, we had to make sure my daughter pottied before we left the house. I still have fears of public toilets, but it ain't the flushing....it's the germs :)
Hope that helps!