In a 40g you could have a small school of one of the smaller Tetra's, like Neons, Rummy Noses, Lemons or Glowlights. 6 would be the minimum you'd need to allow them to feel secure, but you could probably manage up to 8 in your tank.
For bottom dwellers, you could look into some of the many species of Cory catfish. I'm sure there'd be at least one that would catch your eye.