Two ideas:
1) Take Improved Initiative, so you are more likely to to get your Fireball off before your bloodthirsty teammates move into your target area.
2) Think three-dimensionally. A Fireball has a 20 foot radius, and so a 20 foot template is used. When it goes off at ground level that is. If it goes off at 10 feet height you use a 15 foot radius template at ground level. 15 feet high? 10 foot radius. 20 feet high? 5 foot radius (10x10 square). Taller opponents (Large and Larger) may be in the area of the next larger template even if Medium or Small PCs aren't.
You can do similar things with cone effects. Aim them upwards and the cone on the ground narrows. Aim them up at 45 degrees and the spell becomes a line effect *at the altitude of your caster's hand*. That is, since the cone starts at the caster's hand, if they hold it above their head and aim at 45 degrees, only creatures taller than Medium height can be in the area of effect.
Now many DMs I know resent the practice of spell casters being able to target AOEs with pinpoint precision. Those folks will like this even less, so be prepared for the DM to say no, or to call for a Spellcraft check, or something similar.
3) Take the feat Sculpt Spell (3.5 has it, I don't know about Pathfinder. ) That raises the spell slot by one, but gives you a number of options spell shapes and footprints.