We did the trip in June this year and are also going to Vegas in September 2011 for my daughters wedding. I would advise at least two nights on the way to Yosemite. It is such an amazing drive that you will miss a lot if you just stay over one night. Death Valley was one of our favourite stops in our three week trip this year and I would thoroughly recommend some time here. It is so pretty.
After that we drove up to Lee Vining for two nights before going over the Tioga Pass into Yosemite. We wished we had had one night in Lone Pine and just one in Lee Vining.
We didn't see Mammoth Lakes area but visited Mono Lake (spectacular and very unusual). There is a lot to see between Death Valley and Yosemite. Lone Pine has the Alabama Hills where a lot of western films were filmed. Bishop has a good museum, the Lawes museum I think which is a railroad museum. I could go on.
There is also the Joshua Tree National Park in the Bishop area. So you can probably see that there is a lot to miss if you rush the trip. A lot will depend on how much time you have and of course you need time for Yosemite which is something else! Make sure you go to Glacier Point.
Have a good trip