Get Your Dog Care Questions Answered by Experts
It sounds like he has a bacterial or fungal infection. You will need to see the vet to get a culture of the ear and find out what you're dealing with. It could even be simple yeast.
Unfortunately, it's not safe to put anything into the ear until you have a culture. Doing so without one can cause deafness.
Let me know if you still have questions.
If it's yeast, you really need to get some tri-otic from your vet. I would not try any over the counter meds because they can make the problem worse.
If your dog gets these often, you will also want to talk to your vet changing the dog's diet to a low allergy one. This often helps a great deal with recurrent yeast infections.