When you make a commitment to support an ally, it stands to reason that you don't negotiate treaties with their enemies, correct?
Incorrect.
We are allies with both India and Pakistan, for example.
It's pretty hard to find any two countries that hate each other as much as they do.
That is also incorrect. The conflicts between India and Pakistan have been taking place since 1947 with only four wars between the two. That front has been relatively quiet since 1999 with a few skirmishes in the following decade. There have been more wars and conflicts between Israel and Arab countries between 1947 to present, than during any point between Pakistan and India in that time frame. I note, as far as your example is concerned, that we are engaging in conflicts of interest with India and Pakistan. Pakistan harbored a terrorist mastermind who slaughtered thousands of people on American soil. I can't find a comprehensive list on who all of our exact allies are, and the ones I do find state India as a neutral one. Pakistan instigated the Kargil War and was pressured by the US to get out of Indian Territory and back on their side of the LoC (Line of Control, a neutral zone, so to speak). That doesn't sound like the behavior of an ally.
The question here is: How can you support two allies who are enemies of each other? Is this an attempt to appear neutral? Would it not make you appear as a sympathizer to one or the other? Would it also
not promote peace between the two?
One other thing, Iran is not (I repeat: IS NOT) our ally, but Israel is. India and Pakistan have little to do in comparison with this, their last major war with one another being 16 years ago. In Israel's case, you are dealing with an ally being directly threatened by an enemy in Iran, who has been a state sponsor of terrorism since 1984.
I am sitting here watching the US negotiate a flimsy nuclear deal with (from what I have read and heard) no substance whatsoever, which represents an existential threat to the Jewish State. It basically says "Don't build any more centrifuges for a decade, we won't watch you, and when your 10 years are up, you're free to do whatever you want with your nuclear ambitions" that basically means, "we won't look while you secretly develop a nuclear weapon in your quest to destroy Israel."
We are dealing with a singular ally here, not two.