what lubricant should I use?
You can grease the bearings, but the grease won't last very long.  Better to just clean and oil them, using chain oil.  Do this when you clean &amp; oil the chain.

If the derailer is really gunked up, here is what I do:


Lean the bike against a wall, with the derailer facing out.  Make sure you're on a surface that won't mind getting a little oil and dirt on it.
Place a section of newspaper against the wheel such that it covers the lower part of the wheel (trailing off onto the floor) and slides up behind the derailer.
Spray the derailer thoroughly with WD-40 or a similar spray solvent, to remove the gunk.  Ideally, use an old toothbrush to loosen hardened gunk.  (Yes, I know that WD-40 is not a "lubricant".  But it's a pretty good solvent/degreaser for this sort of application.)
Thoroughly wipe the derailer and surrounding area dry with reasonably clean rags or paper toweling.  Also wipe up the puddle that's no doubt collected on the floor.
Oil the derailer and chain with good quality chain oil.  For "general purpose" use (neither wet nor dusty) I prefer a "wax" based product such at Tech-Line KryTech.  Wipe away the excess oil.
Remove the newspaper and wipe again.  (Dispose of the materials "responsibly".)
Give the rim and tire face one more wipe with a clean rag -- you want to get as much oil off of these as possible (and even in the best of circumstances something will spatter there).