when you save it in photoshop, choose 'save for web' and it'll bring up a window with previews of your image... with one regular and (if you bring up the 2-up or 4-up tab) others with different coloring techniques... each should tell you not only the amount of colors used, but also the filesize. pick one that's under the 20kb, save it, and you should be fine.