Products high in calcium and magnesium should not be taken at the same time as antibiotics of the tetracycline (tetracycline, doxicycline, etc.) class, and milk should also be avoided with the quinolone class. They have the ability to bind the antibiotic in the gut, decreasing absorption. There is no reason to avoid dairy products while taking other antibiotics (such as the penicillin class, the one you're taking. The clavulanic acid is to increase it's strength against certain bacteria.) If the antibiotic package insert (or the pharmacists's instruction sheet) states it should be taken on an empty stomach, take it with water. But what you eat when you eat is your choice.
Some doctors believe that milk products cause increased production or thickening of secretions, and that's a problem if you have a middle ear infection. If there is fluid in the middle ear, especially infected fluid, you want the fluid to drain out of the middle ear via the eustacian tube into the back of your throat. So, the thinking that milk makes mucus worse means recommending a decrease in milk products.
Is that thinking correct? Probably not. Milk does not affect mucous production or quality.
In one study of 60 volunteers,
We conclude that no statistically significant overall association can be detected between milk and dairy product intake and symptoms of mucus production in healthy adults, either asymptomatic or symptomatic, with rhinovirus infection.
This has been confirmed in other studies as well. In a subset of asthmatic patients, cessation of milk consumption improved symptomatology, but this is thought to be due to an allergy to a component of milk.
The advice to eat yogurt is in all likelihood an attempt to reduce the risk of C. diff (aka Antibiotic Associated Diarrhea), which is present with any antibiotic. Antibiotics upset gut flora. Live culture yogurt has some beneficial gut bacteria species. However, this, too, depends on the yogurt. Probiotics are helpful, but many yogurts are monocultures and/or don't contain enough bacteria to make a difference to the gut. Some do, however. So, the advice to eat yogurt is good; it may not help, but it might. Look for yogurt with live cultures (plural).
One meta analysis looked at research done on this very topic (which is hot in medicine right now.)
Antibiotic-associated diarrhoea can be attributed in part to imbalances in intestinal microflora. Therefore, probiotic preparations are used to prevent this diarrhoea.
It concluded,
The results suggest a strong benefit of probiotic administration on antibiotic-associated diarrhoea, but further data are needed. The evidence for beneficial effects is still not definitive. Published studies are flawed by the lack of a placebo design and by peculiar population features.
Personally, whenever I put patients on antibiotics, I also prescribed two yogurt brands, one serving of one in the morning and another serving of the second in the evening. The brands I recommended were shown to have sufficient CFUs (colony forming units) of several important beneficial gut inhabitants. (There weren't any single yogurt brand that had the big five.)
Relationship between milk intake and mucus production in adult volunteers challenged with rhinovirus-2.
Meta-analysis: the effect of probiotic administration on antibiotic-associated diarrhoea