You're doing it backwards. If you don't paint with the XCOM palette from start, you'll have problems converting your images (unfaithful colors, wrong "transparent part", etc.)
Well it's technically possible to:
- take a picture
- take an X-Com-compliant picture (say, from another, working mod), which already has the correct palette
- copy your bitmap and paste it into the old file
- remove any remains of the old picture
- adjust any pixels that went bad (usually green).
But yes, it is best to work with the right palette from the start.