Let's see how to get a perfect transparent gif, no bad edges, no background problems!
DO NOT USE the Paint Shop Pro gif optimizer. It's good, but you'll have the same problem you are trying to avoid turning the antialias off. It works with semi-transparent pixels; the graphic will not look perfect.
When you have your graphic ready, merge all the visible layers, right-click and copy it. Paste as new image. This is to avoid extra canvas in your finished work.
Add a new layer, send it to bottom, and fill it with a colour you didn't use in the graphic (this will be the colour which you will set as your transparent one. The program works assigning to one colour the transparency). Choose a weird colour, a glowing one, with a lot of saturation! I always use this: #00ff00 (Brrrrr.....!!!!)
Go to Image/Decrease colour depth/256 colours. Click OK to the dialog (the program asks you if you want to merge in a single layer). Use these settings:
Now, go to Image/Palette/Set palette transparency, and use these settings:
To check the transparency, go to Image/Palette/View palette transparency. Now, go to File/Save as... and choose .gif. You are done!!!