You don't say what type of dog you've got, but if I were you, I'd change vets, or at least ask your vet if you can have a second opinion. Something is causing it, and it shouldn't be too difficult to diagnose. As his ears are so painful he will resist any medication in them. At the very least the vet ought to be able to recommend a soothing application, and apply the first dose himself. The cycle of resistance has to be broken, as I suspect any effective treatment will have to be in the ear. Once they're less painful, it will be a lot easier to treat him.