I'm most familiar with Yamaha keyboards, so I'll let other people make suggestions from Casio, Korg, Roland, and other brands.
As far as Yamaha models, the cheapest model with the best recording features would probably be the PSR-S670, which I think comes in at about the maximum price you can afford, $800. I believe it will let you record 16 tracks in a song, one track at a time, and then save your finished composition to a WAV file.
There are other possible choices from Yamaha, such as the DGX-660 ($800) which has 88 keys, PSR-EW410 ($400) which has 76 keys, or PSR-E463 ($280) which has 61 keys, but their song-recording features are not as advanced as those of the PSR-S models-- they let you record 5 tracks plus an auto-accompaniment track, and if you make a mistake while recording a track you cannot record over just the portion that has the mistake, but instead must record that particular track all over from beginning to end. Also, they do not let you record a song as MIDI tracks and then save the finished song to a WAV file.
However, if you connect the keyboard to a computer then you can use a DAW (digital audio workstation, software for recording and editing audio and MIDI song tracks). So even if you buy a keyboard that doesn't have the best song-recording features built in, using a DAW will give you better options, anyway.
In any case, before you decide to buy a particular keyboard you should see if you can try it out in a store, to see if you like the way the keys feel and how the keyboard sounds.