President Trump has said he would like to negotiate a deal with Tehran over its nuclear program but had also acknowledged that Israel might attack Iran first.