Zadokien saidI also served a mission (here in Brazil) and I do believe this wrong approach on masturbation is unintentional but very damaging.
There's a reason for them to ask that and this reason is obvious. Before the mission, guys have their masturbating moments on their own and they haven't been to the temple yet, where they make a serious commitment with God to not have intercourse before marriage.
Nevertheless, after making that commitment, they go on a mission, with other same sex guys or girls, and spend lots of time together. If there's masturbation, it will naturally be shared and eventually lead to sex.
So, as in the Celestial Kingdom of mormonism heterosexuality is a must. It's normal for them to create some rules that avoid such misbehavior in that pattern of living.
But, the Mormon church is the only Christian church that sets a heaven to homosexuals. Cause there is a ceremony in the mormon temple that states what are the requisites to entering each degree of salvation, which are called "degrees of glory in the plan of happiness." The obeying to the law of chastity is a must only for the next to the last degree in that plan. The two previous kingdoms of glory do not demand any sexual standard.
That is a plan of happiness, and gay people wouldn't be happy in a place their sexuality is twisted into something different do adequate themselves to the pattern of the place. That's why God created different degrees of salvation, where each person would find their own pattern of happiness.
With such a clear explanation of salvation, there's no place for guilt or suffering. People just need to understand who they are and what makes them happy and live their lives that way.
That church exists only to prepare people for those last degrees of glory. If this is not your case, you don't need to demand a change in their beliefs, cause that is their pattern of happiness, and we must accept diversity.
There's no prejudice in the doctrine of the church. If there's any prejudice (and I know there is), it is in the misunderstanding of such a beautiful doctrine.
Um, most men would never tolerate being around another man who is masturbating. And it is rarely ever shared and certainly doesn't lead to gay sex amongst otherwise straight young men. That's Boyd K. Packer and Spencer Kimball talking. Both old dinosaurs who have no clue about human sexuality beyond their own narrow view.(with due respect to them both)
Masturbation is frowned upon because of the thoughts that generally accompany it and the very natural tendency of those thoughts to wander to places they probably shouldn't be. Those thoughts are supposed to be between a man and his wife. If you are on a mission then you had better be focusing on the work and not on the girl/guy you saw that afternoon. Allowing masturbation in such an environment is destructive to the spirit they are trying to cultivate in their work regardless of what the OP's LDS physician says about spiritual masturbation. It is entirely inappropriate in that environment. Save it for later, after your missions.
Heterosexuality isn't a must for the Celestial kingdom. Being worthy is a must. It's the worthiness that becomes fuzzy in regards to gay people. How is a gay man worthy? That is the current debate in the church. Ultimately it's God's choice who enters which kingdom. There isn't one for gays and one for straights. There is a place where we would be more or less happy, but I assure you that I will want to be wherever my parents, family and greatest friends are. That is most likely the Celestial kingdom and I am gay and always will be. I only hope I will get to take my soul mate with me.
There is no easy answer to this question. Doctrine is clear about strait people and what they must do. It is clear about missionaries and what they must do. It isn't clear on masturbation and it isn't clear on gay people.