Air France said it would allow female cabin crew and pilots to opt out of flying routes to Tehran after some staff said they did not want to be forced to cover their hair when in Iran.