You can buy ear cleaning solution for your dogs ears or you can just mix 1 part white vinegar to 1 part water and use a cotton ball to gently clean your dogs ears out with it.
The vinegar and water is a naturally cleaning solution that will get your dogs ears clean.
You can also use water and hydrogen peroxide to clean your dogs ears out with a cotton ball.
For a smaller dog you may need to tear the cotton ball up to make it smaller.