This will be a great trip. Of course, everyone will apportion the days slightly differently, and that includes things like whether or not to see Dresden, spend more time in Budapest or Berlin and less in Vienna, etc. But I can't emphasize enough how different these four cities are from each other; you will have an astonishing variety on this trip. Everyone has very different reactions to these places too, and you won't know how you feel about each of them until you see them.
Will you be able to do day trips? - Of course. That is, if you are not too busy seeing the cities themselves. Of course, if there's a specific activity or sight that draws you, you can do that (the aforementioned Terezin and Potsdam are good examples of "must-sees" for many, although I haven't been to either one). Or if you find you don't like a place as much as you anticipated and want a change, you can do a day trip. No advance planning is necessary for most daytrips, so you can decide while you're there.
My one specific recommendation for a daytrip is for Budapest. While Szentendre is the classic, I found it nice, but touristy and crowded. Vac is actually a faster train ride (if you get the correct, express train, which takes 25 minutes), and at least in 2008, virtually unvisited. The mummies under the renovated town square were fascinating, as was the synagogue and the general town vibe. It's not mentioned in Rick's books; I found out about it in Frommer's Budapest.