No, not in a normal domestic pile, for the same reasons as meat: it attracts animals, it smells strongly as it goes off, and home piles rarely get hot enough to process it quickly. Below: whether you can compost dairy, why, how much to add, and the mistakes that cause trouble.
Adding dairy to a pile. Chop it, mix it, bury it.
Why
Milk, cheese and yoghurt are fat and protein. They go anaerobic fast, produce butyric acid, the vomit smell, and are highly attractive to rats, foxes and flies.
Small traces on a plate scraping are not the issue. Deliberately composting quantities of dairy is.
How to add it
Bokashi handles dairy well; that is one of its genuine selling points. Municipal food-waste schemes reach the temperatures required. A very hot, closely managed pile can cope with small amounts buried deep.
Common mistakes
Treating a smear of butter on a paper towel as the same problem as a block of cheese. It is not, trace amounts are fine.
Adding milk to ‘activate’ a pile. This appears in old gardening advice and does nothing useful.