Parauresis is the "medical term" for it, but it counts more as the inability to urinate in a public bathroom. I havent been able to come up with the actual "____-phobic" by searching the internet.
IMPROVED: The phobia is Agoraphobia. I suffer from it. It's a silly and awful anxiety/fear to live with. It usually confines people to their houses because that is a deemed "safe area".
The "phobia" term for the fear of public bathrooms is "lutropublicaphobia".