I know that when we are writing essays, we cannot use the words we, you, etc. Is it okay if we use the words they, them, their?

Yes. Use of personal pronouns is not appropriate in formal writing. All other pronouns are acceptable. Check this site for a list of personal pronouns.

http://www.englishclub.com/grammar/pronouns-personal.htm