I haven't received a decision from Stanford yet, but I hope to legitimately post in here soon!
At any rate, I've been at Stanford for almost 4 years and have done a lot of commuting in the area. Visit
www.caltrain.org and
www.bart.gov for information about taking a train. Caltrain has a stop right by the Stanford campus (maybe 10 minute walk from the med school); Caltrain connects to BART in case you need to get somewhere that Caltrain doesn't take you. If you're taking the Caltrain only, it takes about 50 minutes to get to San Francisco. I think a lot of people buy monthly passes or something similar. This might be an effective solution, but I did not look at the price (sounds like you may have already).
As for driving, it depends on the time, but it generally takes about 45 minutes to get from San Francisco to Stanford. Around 6pm on a Friday night it's taken me more like an hour and 15 minutes. Probably not pleasant to do on a regular basis, but possible, I suppose. Parking on the Stanford campus is decently easy to find
http://parking.stanford.edu but I believe that it will be more difficult and more expensive in San Francisco.