WASHINGTON — Sen. John Kerry, President Barack Obama’s nominee for secretary of state, said Thursday that the United States will “do what we must” to prevent Iran from developing a nuclear weapon even as he signaled that diplomacy remains a viable option with Tehran.Testifying at his confirmation hearing, and with Senate approval a foregone conclusion, Kerry addressed a range of concerns raised by members of the Foreign Relations Committee, from his past outreach to Syrian President Bashar Assad to GOP concerns about the nomination of Republican former Sen. Chuck Hagel to be defense secretary. “The president has made it definitive — we will do what we must to prevent Iran from obtaining a nuclear weapon,” Kerry said in his opening statement. “I repeat here today: Our policy is not containment. It is prevention, and the clock is ticking on our efforts to secure responsible compliance.”Pressed on Iran and its nuclear ambitions, Kerry said he was hopeful that the U.S. and other nations could make progress on the diplomatic front, but that Tehran needs to understand it must prove that its program is for peaceful purposes. “It is not hard to prove,” he said, stressing that “intrusive inspections” are required.In an unexpected exchange, Kerry found himself defending Obama’s controversial pick of Hagel to be the next defense secretary against GOP criticism.Sen. Bob Corker, the senior Republican on the panel, expressed concerns about Hagel’s support for an 80 percent reduction of U.S. nuclear weapons, a major issue for the Tennessee lawmaker and his home state. The Y-12 nuclear facility is located near Oak Ridge, Tenn., and any cuts would have an impact on local jobs.