The UK's Foreign Secretary has apologised for causing distress to a British citizen jailed in Iran, and her family.