First of all, Bruno Alves, in English we say that you have a "question", not a "doubt" in this context. As far as your question (which we will now *answer*), native English speakers use both in conversation all the time. Some people would consider "when for" to be wrong, but the "rule" against ending in a preposition is complete nonsense. Still, "when for" could be considered more casual (and also more natural, unless we're really trying to stress the "when").