You really are at the mercy of the weather, since you've got the Sierra Nevada mountains blocking the path between Death Valley and the Yosemite Valley.

Once the snow starts to fly, most of the passes over the mountains are not driveable. As has been mentioned, that usually happens some time in November. The only year round passes in this area are CA-58 (a fast 4 lane highway) and CA-178, both which would take you to the Bakersfield area, or US-50 and I-80, both are up near Lake Tahoe. You might be best off getting a paper map of the area so you can have a better visual idea of what we are talking about.

If you are looking to do this trip in 2 days and see Death Valley and Yosemite after the point where Tioga Pass closes, the going via Bakersfield really is the most practical route.