Hey, I was in Europe last year for two weeks; not backpacking, but on quite a few trains and lots of public transportation. Never had a problem with toilets, and as seconder said, they have pay public toilets on the street. I was in Italy, France, Germany, and England...and didn't have a problem anywhere. My niece actually had more of a gut problem than I did, and had to take Immodium. When she finally told me that she was having the problem, I went to the nearest grocery store and bought her some liquid probiotic drinks and it seemed to help quite a bit. You can find them in most of the countries in the grocery store, by the yogurt section. I found the Europeans to be very helpful and gracious. I don't remember seeing any signs that said you couldn't use a restroom in stores, etc., but then again maybe I couldn't read the sign in that particular language!
Just kidding, actually, most everything is posted in English. Enjoy your trip; I can hardly wait to get back over there!