My recommendation from my limited experience would be a cyclocross bike. I got the Specialized Tricross for the same reason you are asking. I needed a bike to do long distance road riding (from commuting to ALC) that could also handle the dirt trail down to uni. The tricross works great. Sturdy bike that can take tyres with a little extra tread for the dirt trials, but sleek enough for long distances on road. And it had braze ons for attaching rack and fenders for commuting. Not sure how many thousands of miles I've put on this bike by now, but it did get me through ALC twice, down the dirt trail to uni daily when I worked there, and regular commutes on rough roads up big hills here.