Vinod,
This is not an easy thing to do programmatically. What I'm going to write applies only to 24 bit color bitmaps. 16 color, 256 color and 32 bit color are different.
Two structures (BITMAPFILEHEADER and BITMAPINFO) make up the first 54 bytes of the file. The color data is stored beginning at byte 55. The colors are stored in a Blue, Green, Red format in terms of the order they appear in the file. You'll have to figure out the exact color your looking for (white is easy since it's CHR(255) + CHR(255) + CHR(255)) and what the color value should be of the replacement. The HexEdit.app can be of help here.
I'd use FILETOSTR() to load the file into a string, then parse it in 3 byte increments look for the exact match and when found replacing it accordingly.
George
Ubi caritas et amor, deus ibi est