You can drive off the road to pass another vehicle:

You may never drive off the paved or main-traveled portion of the road and onto the shoulder to pass another vehicle.

Wait, before you go

Ace Your California DMV Written Test with our Guaranteed Cheat Sheet