Pentagon head vows to prevent Tehran getting nukes, says Washington committed to diplomatic outcome but will examine alternatives if Tehran isn’t willing to engage