Hi there sweefu, good move to include flashlights in your travel plans. They are absolutely indispensible in South America, at least where I live. Dark streets and alleys in town, weekly power outages, dark bus rides at night, etc. Imagine crossing this bridge (not in the jungle, but in a regular neighborhood of houses near town) at night without a flashlight...

Or perhaps a nice walk on a heavily transited sidewalk in town would be safer?

(I seriously did look for skeletons down there when I came across this. It's more than a meter square and probably 5 meters deep, on a VERY busy sidewalk in an area that's poorly illuminated even when there isn't a blackout.)
So, you'll want to take a few flashlights.
AA batteries are an excellent choice down here, availability is quite good, even in a little corner stores. Here they cost about $2 for two Energizers or Duracells, $0.80 for two AAs of marginal quality, or $0.50 for four truly junky cells. Even more common that AA batteries are D cells, but unfortunately there aren't a lot of options out there for a good D cell LED light. Here they're still using Rayovac or Brinkman incandescent D cell flashlights as the norm. Or candles. Or bottles of diesel with a cloth wick. 
I keep one of these on my keychain at all times, they can be found everywhere on the internet.
I also would recommend that you take several dirt cheap 1xAA "Powerlights" which give excellent runtime on even the cheapest dead-out-of-the-package AA cells. These are well priced:
For a nicer multi-mode 1xAA flashlight, I'd recommend a Trustfire F20 or the Trustfire R5-A3:
http://www.manafont.com/product_info.php/trustfire-f20-q4-5mode-memory-led-flashlight-1aa-p-5499
http://www.manafont.com/product_info.php/trustfire-r5a3-3mode-memory-led-flashlight-1aa-p-5498
Hope this helps! Have a great trip.