It depends on the state or country that you live in, CaliforniaChris. In the US, some states don't have any protection for transgender individuals. Some states have protections in place for transgender individuals, but the law excludes bathrooms from that protection. And some states have the whole deal.
If you are living in California (not Baja) then you have a right to use whatever public accomodation fits your gender. However anyone can call the police, and the police don't always follow the law, so it is best to use the restroom that matches how you are presenting. A carry letter, as Ms. O'Brien suggested, is a very good idea. My physician called it my "get out of jail free card", and that despite living in a state with full protections.
From a publication by
NCLrights.org:
QuoteCalifornia's Unruh Civil Rights Act prohibits sex discrimination in public
accommodations and defines "sex" to include gender identity. The Act is written
broadly and states that "[a]ll persons within the jurisdiction of this state are free and
equal, and no matter what their sex, . . . are entitled to the full and equal
accommodations, advantages, facilities, privileges, or services in all business
establishments of every kind whatsoever," although that broad definition has been
narrowed somewhat by the state's courts.