Photek,
There are some dwarf species out there that might fit in a 24 gallon. TONMO'ers typically recommend about 30 gallons for a dwarf octo, however. These limits aren't just to give the octo some space, but octos have very high metabolism, veritable ammonia-factories (up three times as much as a similarly-sized fish!). Having a big water system is important to keep it from getting overloaded. Given that, if you've got some experience, you might be able to push it a little with a dwarf in a 24.
The big problem with dwarves is they're kind of hit-or-miss. They're very short lived (months, not years!) and you can only get them wild-caught. Further, the people that collect and sell them don't know much about them, so often times you'll get one (maybe you paid $40 for it and another $30 for shipping) and its already a grown adult with only a few weeks of life left in it. Add to this octos are usually pretty shy for their first month or so in their new home, and even after that they're usually nocturnal.
For these reasons the most recommended octopus is the California mudflat octopus, O. bimaculoides, often called a bimac. This animal is aquacultured, meaning you get it knowing exactly how old it is and it already is used to captivity. They will still be shy for the first month or so, but they will come out during the day after that. The problem is this gets to be a big critter. If you want one of these, you should get a 55 gallon tank at least. Most bimac keepers like to have a 75+.
Dan
p.s. Greg -- you're turning soft!