I don't see why not.
I commuted to our 8th grader's graduation (I teach) in a nice evening dress and heels and to our annual Open House where we meet prospective families wearing dressy attire.
Who cares how you arrive. If you need to throw something on over your bike shorts, just whip out a skirt or capris and throw them on. Nobody will be the wiser.