What kind of dog is it?
You need to stop the shaking or it will cause a hematoma (sp?).
Its where the blood rushes to the tip of the ears they form a bulge and will start to bleed and when a dog shakes his head with ears bleeding it makes a mess!
For now cut the toe end of a sock and put it over his head with the ears tucked in (like a snood) to stop them from flapping.