A vanishing theorem for Donaldson invariants