You can't with the GIF format. GIF only allows for one transparent color. When you anti-alias or smooth your images, this one transparent color needs to be the same as your intended background for the best effect. On any other background it will create a jagged look.
The PNG file format was created to get around this issue. It supports an alpha transparency layer which allows you to apply tranparency to one or more images. It was also created to reduce developers reliance on the GIF patent from Unisys. The problem with it and why it hasn't been adopted widely yet is Internet Explorer doesn't filter the alpha transparency by default. You have to apply a DirectX filter to the image so it appears correctly. Bad implementation by Microsoft Developers as this should be applied transparently but it is what we have. To show alpha transparency in IE, you need to apply modifications to vBulletin, but once applied they work great. The best is the one released for 3.5, though it should work on all versions since it doesn't rely on any vBulletin code.
You can find it here:
https://vborg.vbsupport.ru/showthread.php?t=94416
The only issue with the modification is that user's on slow connections may see a flicker in the images as the page loads as the filter isn't applied until the page finishes loading.