The BART system has its own police force and is generally very safe. I've never worried about taking the BART from SFO to Berkeley (which also goes through west and downtown Oakland), even late at night. Also, the violent crime rate in Oakland is mostly driven by gang/drug turf wars. If you stay out of that business, you'll probably be fine.