I had something very similar, I believe. Though I never had brown spots, I did have a white milky like substance build up. My scalp also burned and itched, and when I itched it would get red and sore for a bit.
I used a shampoo you can get without a prescription called T-Gel. I also used a topical cream that was prescribed, for the life of me I cant remember the name of it
Im very sorry bout that. And the milky white build up went away.
I'm not sure if it is the same problem. But it sounds similar, perhaps trying the T-Gel shampoo might help? I would definitely go see your physician.