The bomb was not tested until July 1945. Iwo Jima and Okinawa were fought in February and March respectively of 1945. The knowledge of the full extent of the manhattan project was limited to a few. Harry Truman then as Vice President was not even aware of the project until FDR's death in April. Up to this point the plan was the invasion of the Japanese mainland in the fall of 1945, the seizure of these two islands helped secure airfields. These airfields would support fighter escorts/cover for bombers to the mainland as well as logistical bases for the invasion. Therefore at the time of the battles of both islands it was not strategically pointless but strategically important.
The importance of Iwo Jima was proven in the middle of the battle when the first badly shot up fighter landed on the runway. We can look back and say it was pointless, but not nearly as much as say Tarawa(a one mile atoll with no real significance). We firebomb Tokyo countless times, which must have degraded the belief in the god emperor. The troops actually found out FDR died at Iwo Jima, and the significance of this battle with the most intense hand to hand combat possibly of the war echoes through the history of the marine core to this day. The underground tunnel system with advanced hospitals that resisted days of bombardment along with the "kill ten Americans or one tank" message sent from the Japanese commander probably made the decision to use the bomb much easier. Okinawa was a reminder that the US has paid a huge cost with American lives and still have not technically reached Japanese soil. After Okinawa they were targeting the island (Kyushu) below the Japanese main island (Honshu), which would have resulted in an estimated 1 million American casualties. So Iwo Jima and Okinawa, to me, have significant narrative importance towards the strategic decision to use the atomic bomb.