I rather agree with Cody. I've never risked putting anything with a Betta in such a small tank and it does depend on the Betta's personality. I've had three females in a 46 community before with very few problems. My other fish were guppies, neon tetras, glowlight tetras, an upside down catfish, a few Platies and a few Mollies. My tank had many hiding places and lots of plants.
Sometimes, though, Bettas just don't get along with other fish no matter how big the tank is. I had a single female Betta in a similar tank (40 gallons) and she totally dominated everything in there. She was so aggressive at times that she singled out certain guppies and killed them (both males and females). I lost several fish before I realized she was doing it. If I hadn't seen it with my own eyes, I would still be reluctant to believe it because she was so peaceful looking most of the time. She did move rather quickly around the tank and postured at other inhabitants (even my hand), but didn't usually attack.
You can try it and see, but be prepared to move some fish if you find the Betta is too aggressive. They can be very territorial also, so if you plan on getting more than one (females) introduce them to the tank together.
"One fish, two fish....red fish, blue fish."