Applying hydrogen peroxide to your dogs ears is okay but don't pour the hydrogen peroxide into your dogs ears to treat the sores or ear mites.
Take a cotton ball and soak it in the hydrogen peroxide and apply the hydrogen peroxide to your dogs ears by dabbing the cotton ball soaked with hydrogen peroxide to your dogs ears, sores etc.