So, from what I know (or think I know) American high command tought that to end the war soon without taking more casualties in an invasion of mainland Japan the best option was to use the bombs.
It seems fairly reasonable to me and almost excusable. What I find difficult to understand and makes the bombings inexcusable in most people's eyes was that instead of a military or naval base, which would display the power of the bombs without as many casualties, they decided to nuke cities full of civilians without (AFAIK) any warning or sign that they would.
So my question boils down to, was there a specific reason(s) they decided to nuke cities?
There are several answers to this question, all intertwined. One is that the atomic bombs they ended up developing worked best on large, "soft" targets. This was due to technical decisions made early on in the project, a form of "path dependency" adopted well before any specific targets were being considered. This caused the technical advisors to recommend that cities would be the ideal target for the bomb. Given that the US Army Air Forces were already targeting cities as part of their firebombing campaign — indeed, they needed to "reserve" several targets for atomic bombing if they wanted "virgin" targets — this was not really a change in strategy. There was some contemplation of an isolated military base as a target, but they feared that even a slight deviation in accuracy could lead to the bomb being mis-targeted and its impact under-stated.
From the perspective of the planners directly involved in target choice, the goal was to have the first uses of the atomic bombs be as spectacular as possible. They wanted them to have a psychological effect on the Japanese and the world at large. They believed, rightly or wrongly, that if the atomic bomb's impact was minimized in any way it might not only make their impact on the war at hand be also minimized, but it might lead in the long term towards dangerous arms races and future nuclear war. For this reason the two committees that contemplated targeting strategy (the Interim Committee and the Target Committee, both composed of a mixture of scientists, statesmen, and military representatives) concluded that the destruction of cities would best showcase the weapon's power.
Lastly, it is of note that Truman himself may not have been fully aware that cities were the targets, at least not for the first bomb. The only intervention he had in the planning process (other than non-interference) was to go along with the request by the Secretary of War, Henry Stimson, that Hiroshima be the target of the first atomic bomb, and not Kyoto. Stimson had complicated personal reasons for this, but he argued in essence that Hiroshima, because it had a large military base, was a more legitimate target than Kyoto, which he framed as ostensibly civilian. Truman appears to have taken this framing to heart and, in one interpretation (mine), seems to have believed that he chose to use the first atomic bomb on a military base, rather than a city. There was a marked shift in his language about the bombings once he learned (only on August 8th) that the hundred thousand casualties at Hiroshima were in fact 90% civilian.
Note that almost all of the above was divorced from any discussions about invasions. The invasion and the atomic bombs were parallel planning processes and had little to no interaction. Contrary to popular understanding it was not a matter of bomb or invade but bomb and invade. There were many positive reasons seen for using the atomic bombs, and it was not the difficult moral deliberation that it was later portrayed to be. The "either/or" framing only was put into place once there was felt a need to justify the bombings in the face of such casualties, and there appears to have been zero impulse to do so until extremely high casualties were reported (again, on August 8th) and most of the canonical justifications were postwar ones (after the atomic bombs had appeared to "work" at ending the war).
For further reading:
The primary source I always give to people and students for thinking about the targeting decisions is the May 1945 meeting of the Target Committee, which goes into some depth into their methodology and reasoning, including why they did not want to target a purely military target.
On the ways in which the technical choices made early on impacted later options, see esp. Sean L. Malloy, "'The Rules of Civilized Warfare': Scientists, Soldiers, Civilians, and American Nuclear Targeting, 1940-1945," Journal of Strategic Studies 30, no. 3 (2007): 475-512. This is an excellent and comprehensive answer to your question.
On the question of Truman's own knowledge about the nature of Hiroshima, his role in the Kyoto decision, and its implications for our understanding of the bombings as well as his postwar nuclear attitudes, see my recently-published article: Alex Wellerstein, "The Kyoto Misconception: What Truman Knew, and Didn't Know, About Hiroshima," in Michael D. Gordin and G. John Ikenberry, eds., The Age of Hiroshima (Princeton, N.J.: Princeton University Press, 2020), chapter 3.