Britain's foreign secretary has said the UK is trying to de-escalate tensions in Iran to avoid a war after a US airstrike killed its top general.