Having photographed professionally for over twenty years  and digitally for 12 of those, my rule of thumb is to always shoot with the best equipment and film/settings as possible.   An 8 mp camera with a better cmos sensor with better lenses can give you  better images than a cheaper sensor and more pixels.  Example the original Nikon pro D1 only had only 4 mp but its ccd sensor remained unmatched by anyone for years even at higher resolution.  It wasn't until the 3 generation cmos sensors the Canon could boast comparable results in their pro EOS line.  My wife has a Panasonic 14mp and I can still out shoot it with my Canon EOS 30D at 8 mp.

GIF and PNG are as others have mentioned more for internet uses where  256 colors or web corrected colors are adequate.  JPEG is also for use on web and digital formats where more complex images are needed but where with help of programs like  Gimp and Photoshop can convert larger stable images into jpeg with algorithms that use color choices that reduce the chance  of losing more detail.

That said a best practice is always to shoot in raw. Raw saves all of the shot information (EXIF data) in the image for further manipulation later. If you shoot in jpeg this info not available  to you.  If you enter digital completions your images may be disqualified without EXIF data.   When I shot film I always stored my negatives in glass paper covers and kept them in low light cabinets in ac controlled environments because this is the best way to ensure that your originals stayed chemically inert.  I would consider the shooting and storing of  images in raw the equivalent to this.  I you need a lossless compressible file format save a copy as a TIFF.

James