It all depends on what kind of adventure or campaign you are planning to run.
But if you ask about quick and dirty way to compose a "balanced" dungeon crawling troupe, well, the fastest and maybe the most important thing is to include,
1: A pure cleric (no multi-class)
and
2: Someone who can deal with traps (rogue, scout, ninja, beguiler, or someone multi-classed in them, etc.)
IMHO if you have those 2 characters in your party, the classes of other members are not so important.
Those 2 are "problem solvers". A Cleric is not a simple walking bandage. Basically, only cleric knows all the spells in one's class list and also has enough problem solving spells in one's class list.
Many official adventure modules of certain levels are made the presence of appropriately leveled cleric character in mind. Say, if that module is for level 2-3, the author does not hesitate to include some monster or trap which causes ability damages, because a cleric can cast Lessor Restoration. If a module is set for L11+, author may assume that at least one PC can cast Plane Shift spell. And so on.
Regarding the trap specialist, any party which commit dungeon crawling need one. Preferably someone with stone-cunning racial ability (Dwarf, Deep Halfling, etc,). He does not need to be a pure rogue though.