The very neat 'the invasion would've killed more' argument doggedly defended by everyone on this site is attractive, I admit. Generally I favour it. But I do feel that there's a nagging flaw that perhaps derives from the differences in the British and American history curricula.
In Britain, we're taught that there's a possibility that the Japanese were considering surrender before the bomb was dropped. The war was de facto over for them. In America, from what I can gather, this doesn't seem to be taught, with an apocalyptic vision of Operation Downfall being the preferred picture that is painted.
As counterfactualists, we have an interest and perhaps a duty to consider what might have been - therefore, in the absence of decisive proof that the Japanese would not have surrendered without Hiroshima or Downfall (and how can that ever exist, given that it is the proof of a speculative negative?), I can't conclude with certainty that the bombings were justified.
Do I believe that Harry Truman's decision, given the information available to him, was the right one? Yes. But to say something is 'justified' suggests a longer view of history than that, and I can't therefore in good conscience say that the nuclear destruction of Hiroshima, much less Nagasaki, was justified.