Officially admitting it is a lot different than knowing about it. Yes they officially admitted that they knew about the last month. You said "America did not know", that is incorrect. America knew, Iran knew, the entire world knew. The name of this book is The Worst Kept Secret for a reason.
Well it was ok because at the time it served the purposes of the American government well enough so long as they were quiet about it. The reason they haven't signed the NPT is most likely because they are obliged to stay officially silent on the matter due to their understanding with the US. This isn't to say that it's a good idea, but there are the facts. You can't have a nuclear programme and not fess up to what you're doing if you sign the NPT.
Now on the deeper level why is it ok? Well it isn't. Nobody should have nuclear weapons, but if you accept that a country like the United States "needs" nuclear weapons in order to stay safe, then it's sort of trivial to understand why Israel might follow the same logic. It's noteworthy that the rhetoric about completely defeating Israel more or less stopped from the more rational regimes in the Middle East in the 70s and it's widely accepted that the reason for this was Israel's nuclear arsenal. So in a way that is fairly hard to dispute nuclear weapons increased Israel's short term security.
Now with that in mind, the problem is that this introduction of nuclear weapons into the region makes it very difficult to meaningfully oppose nuclear programmes amongst its neighbours.
It's also worth noting that Iran is pursuing nuclear weapons at least as much to protect itself from the Sunni gulf states with which it has a historic animosity as it is to defend itself from the United States and for treatment as an international nuclear power. The idea that Iran is going to build a bomb and then head off and drop it on Tel Aviv is mostly fantasy.
If you want to know more about the topic I would strongly recommend this book: http://www.amazon.ca/The-Worst-Kept-Secret-Israels-Bargain/dp/0231136994
It's probably the most clear headed discussion of the facts and political problems related to the Israeli nuclear programme I've seen. His sources are excellent and it isn't afraid of bucking the official line.