First you need to make one distinction. Sometimes normal vaginal discharge can dry to a yellow color. That's perfectly normal.
If the discharge starts out yellow, it can be a symptom of both bacterial vaginosis and trichomoniasis. Do you have any other symptoms besides an odor now and then? Any itching, burning, irritation, fever, abdominal pain, pain urinating, pain during sex...?
Also, if your doctor is not listening to you, you need to find another one, if possible.