Actually, this condition is called paruresis. I suffer from it pretty severely. I find it physically impossible to use a public restroom unless it is completely unoccupied. I also cannot use restrooms in people's houses (or my own house for that matter) if there is someone in hearing distance. I developed this long before social anxiety, by the way.
It is pretty debilitating, almost to the level of SA. I have to plan my day at college around what time the bathrooms will be empty. Sometimes I find myself being out somewhere and holding out as long as I can without using the bathroom, until finally I can't take it anymore and I have to leave. With SA it's like a double-whammy.
Yeah it pretty much sucks.