Improved Nonlethal Substitution (3.5e Feat)
From D&D Wiki
Improved Nonlethal Substitution [Metamagic]
You can modify a spell that uses energy to deal damage to deal nonlethal damage instead.
Prerequisite: Any three metamagic feats, Knowledge (arcana) 15 ranks.
Benefit: Choose one type of energy: acid, cold, electricity, fire, sonic, or force. You can modify a spell with the chosen designator to deal nonlethal damage instead of energy damage. The altered spell works normally in all respects except the type of damage dealt. For example, a nonlethal fireball spell works in the usual way except it deals nonlethal damage instead of fire damage. A nonlethal spell uses a spell slot of the spell’s normal level, modified by any other metamagic feats.
Special: If you can use turn/rebuke, you can change a divine energy descriptor to nonlethal damage as well.