We present phase resolved optical spectroscopy and photometry of V4580 Sagittarii,the optical counterpart to the accretion powered millisecond pulsarSAX J1808.4−3658, obtained during the 2008 September/October outburst. Dopplertomography of the N iii λ4640.64 Bowen blend emission line reveals a focused spot ofemission at a location consistent with the secondary star. The velocity of this emissionoccurs at 324 ± 15 km s−1; applying a “K-correction”, we find the velocity ofthe secondary star projected onto the line of sight to be 370 ± 40 km s−1. Based onexisting pulse timing measurements, this constrains the mass ratio of the system tobe 0.044+0.005 −0.004, and the mass function for the pulsar to be 0.44+0.16−0.13 M?. Combining this mass function with various inclination estimates from other authors, we find noevidence to suggest that the neutron star in SAX J1808.4−3658 is more massive thanthe canonical value of 1.4 M?. Our optical light curves exhibit a possible superhumpmodulation, expected for a system with such a low mass ratio. The equivalent width ofthe Ca ii H and K interstellar absorption lines suggest that the distance to the sourceis ∼2.5 kpc. This is consistent with previous distance estimates based on type-I Xraybursts which assume cosmic abundances of hydrogen, but lower than more recentestimates which assume helium-rich bursts.