1. Our teacher told us to write our names on the papers.
2. Our teacher told us to write our name on the paper.
If the meaning is intended to be that each student should write his/her name on a single sheet of paper, both of the examples can be confusing. Logic tells us, in both cases, that the students only have one name (although each has a first and last name). But what to do about "paper". Are all the students signing one paper? Or do individual students sign multiple papers?
The most accurate statement would be in the singular.
Our teacher told each of us to write his/her name on his/her paper(s).
But then many would object to having to use both genders or a single-gendered adjective or plural pronouns for a singular use.
One can eliminate the gender issue with paper/papers by using an article instead of a possessive adjective.
Our teacher told each of us to write his/her name on a sheet (or the sheets) of paper.
That is about as good as it gets. The good news is that it won't really matter in most cases. Context will usually clarify the ambiguity.