The president attacked several prominent right-wing commentators who have opposed the war against Iran