Electronic component for tapping
I think a small enclosed vibration motor will suit your needs. This type is ~ 10 mm diameter, 2mm thick. 



The drawing in Spehro's answer made me curious, because the thingy he shows is looks a lot like the motor I have, so I dissected one. Conclusion: the motor I showed is definitely a rotating type, not a pulsing type.