You're not going offroad through Yosemite, that's for sure: it's a national park. To the north and south are more national parks (Kings Canyon and Sequoia) and various wilderness areas--all forbidden to off-road motorized use. You'll need to go further to the north or the south to get around them, or hop onto the pavement over the pass of your choice. Don't forget to allow for snowmelt, which might close mountain routes until July--even later in a big snow year in some areas.
Order up copies of the applicable Delorme or Benchmark atlases for initial planning, then contact National Forest and Bureau of Land Management offices for the areas you think you'll be passing through--often they'll have maps aimed at motorized travel listing where you can and can't go and what the local regulations are.
Once on the road, be prepared to gather local information (i.e., talk to everyone you meet) and to improvise when nothing goes quite as planned.
Hope that's helpful.