I wish there was another way.
But it was a lose/lose for the US.
If we do nothing and Iran gets the bomb, the whole middle East goes up in flames and the radiation spreads all over the world, and very likely the US would have to intervene anyway at that point.
If we act now we risk Muslim anger forever, but realistically we just kick the shit out of them and that's the end of the story.
There is no "good" solution to this equation. The best response was to act proactively and pre-empt the threat.