There are some some best practices for keeping images small. When using Adobe's suite of software there is an option to save for the web (photoshop, illustrator, fireworks). With this option you can really hone down on the exact colors and formats you will be exporting.
gif is usually better for images with fewer than 256 colors and 1/0 transparency (no %).
jpg is better for images with lots of different colors, eg photos.
png is best for % transparency and smoothly compressed gradients.
Since things change so drastically between each image it really comes down to experimenting. With the save for web feature you can limit everything about the export, including # of colors for gifs, quality for jpgs and transparency for pngs (among other things).
Best of luck!