US President Donald Trump said the US and Iran had held "productive conversations” aimed at ending the conflict in the Middle East, though Tehran denied any talks.