In photoshop hit ctrl+shift+alt+S (for macs command+option+shift+S) all at the same time, or under file>save for web. This prepares image using the imageready engine for web; this tool allows you to control the file size and type.
To make the file under 50kb you must adjust the settings to the right (see image) In gif or png you choose how many colors you want; in jpg you use the quailty slider. There are also other options play with them, they can make a big difference. You can monitor the size by looking to the bottom left of the images ready dialog box as seen in the picture.
