You can try ImageMagick:
convert input.gif -transparent white output.gif
For more advanced features you should try something like image masking or do it manually using any image library, setting the pixel values to something with a high alpha value.
See also this thread: http://www.imagemagick.org/discourse-server/viewtopic.php?f=1&t=10665