They could have done offshore blasts to limit casualties and point out "That could have been Tokyo" They didn't have to start with cities. They could also have hit a fleet at sea, a purely military target.
Remember that though the U.S. may have had few bombs the Japanese not only didn't know that but would have assumed otherwise if they were willing to expend them in demonstrations.
[*crrrrk*] ATTENTION ALL HANDS, ATTENTION ALL HANDS. STAND BY FOR HISTORY LECTURE. THAT IS ALL. [*crrrrk*]
[you know, maybe I should start doing that every time my history soap box comes out... 'fair warning' and all that

]
The IJN didn't have a fleet. Ninety percent of their major ships, with some very few exceptions like Shinano, were already at the bottom of the sea. To put point on it, 75% of kamikaze attacks were IJN aircraft. Virtually all of them originated from land.
The Los Alamos scientists were unsure of what the effect of a sea detonation would be, but what they did know was that most of Japan's protein came from fish and wrecking the fisheries would be a poor occupation policy.
Lastly, as Condo pointed out, the bombs weren't just to induce the Japanese to surrender. It was also pull on Uncle Joe Stalin's choke-chain. RAND Corp. estimates and later NKVD /KGB files noted that Stalin wanted to push the Allies to beyond the Rhein and then force every nation East of there to become Communist buffer states.
One of the great dangers of history as a subject is incredible amount of 'yeah, but-ism' it has to deal with. Twenty-twenty hindsight is a degenerative disorder of the logic functions of the brain. You can only measure the intent of a decision [ESPECIALLY one as world-changing and strategic as the atomic bomb] ONLY by the information the decision-makers had at the time. Using a bunch of 'I Dream of Jeannie' wishful thinking devalues the moral and ethical weight of such decisions and renders it merely a triviality.
What Truman knew was this:
- Downfall was going to cost America and Australia hundreds of thousands of casualties;
- to emphasize that point, the War and Navy Departments put in an order for so many Purple Heart medals that it was halfway through the GWOT in Iraq before DoD had to order any new ones;
- LeMay's firebombing did not seem to have effected the Imperial General Staff into considering surrender;
- [note- don't get me started on the wingnuts in aviation and their 'Billy Mitchell disease' - the idea that strategic bombing could win a war by itself]
- the Manhattan Project was positively
riddled with Soviet spies, and OSS and FBI knew many of them by name;
- the OSS suspected that the Soviets were hard at work on their own atom bomb, but could not estimate when that bomb would be tested;
- the Soviets were already dropping the Iron Curtain on Europe;
So Truman's decision had three closely linked goals:
- to compel the Japanese to surrender and thereby stop the killing;
- to reduce US and Allied casualties to the greatest degree while doing so;
- and to show the world [i.e. Joe Stalin] that if pushed too far the US would indeed use atomic weapons, that we were not the 'soft democracy' that Nazi Germany and Imperial Japan accused us of being.
Last thing:
Regarding the reduction of American casualties, even as President Harry Truman sometimes still thought like the War One artillery battery commander he used to be [he eventually rose to become a Colonel in the Missouri National Guard]. The American way of war is to spend men if you must but preserve all of them that you can. We teach our officers to spend gunpowder instead of blood. From a strictly emotional standpoint, I believe that deeply effected Truman's decision.