If the DM is willing to blithely break rules and invent situations to nerf characters, you can't optimize it, except in that you convince him you're playing what he wants you to play but better. So as far as that goes, be a non-flashy character, like a control wizard or the like. Everyone understands damage, usually only people who understand the dynamics of the game realize the danger of enlarge person and grease.
That said, if you're trying to win a fight against the GM, you're out of luck. Your best bet is not to try and do it mechanically, where he'll just rule zero you or summon a Baylor, but roleplaying wise. He can strike at your characters, but you can strike at his campaign.
I suggest playing low. A Vow of Poverty, Non-Violence, and Peace character totally screws with most campaigns. (ab)Use diplomacy.