I've tried the rubber tube trick but prefer the TwoFish light block for small lights like the PD30 referenced above or my LD10 (and possibly a Zebralight SC51 in the very near future once it is released). While you can leave either the self-made rubber strip or a TwoFish block mounted on your bars permanently, the TwoFish is somewhat less conspicuous when empty.
Either approach may be problematic if you have swept back bars and can't mount the light parallel to front wheel's line of travel.