Not sure its a clear cut as that, The Japanese had as you said started to discuss surrendering but there is know way of knowing if it was going to be a total surrender like the Allies wanted. Whilst any "negotiations" would be going on the Russians would have been racing in from the east (having only just entered the war) the last thing the Western powers wanted was Russia taking a slice of Japan as well. The war would have carried on the casualties would have got even worse than that of Okinawa. Some reports had civilian deaths at 125,000 , Soldiers 110,000 .
Whilst i agree that there was a element of boys and new toy about it, i am not totally convinced there was no need to use it at all and in the end was it any worse than the fire bombing that had gone on before.