Need Help with Driver for Bicycle Light.

Anything that fills the voids and isn't conductive will work. Oil, thermal grease, putty, rtv, etc. Here's a thread about potting material.