You can always ask, but what sort of reference do you think you'll get? 2 months is no time for your employer to really discover what you're like. Infact the only thing it says about you is that you don't appear to be able to stick at a job for too long!
Ask the temping agency that got you the job (assuming you got it through an agency) if you've done several assignments for them they would be the best people to ask for a reference.