There is an ATM dispensing both US Dollars and Kenyan Shillings in the corridor to the immigration hall, in Terminal 1A.
Transit visas generally get issued immediately after paying, online. Tourist visas can take a little longer to approve. I've also found the SkyPriority immigration line aren't happy at issuing transit visas on arrival.
Oh and they are very flexible with transit visas but it DOES have to be a "real" transit - FCO-NBO-FCO will likely get a refusal, if they notice.