At the time that he joined the TARDIS crew, Oliver was facing arrest by the Metropolitan Police Service for engaging in homosexual practices, then still a crime under British law. When this happened he found out that the company he worked for was trading in human slaves. After he helped the Doctor to stop this he was asked to travel with them. (AUDIO: The Perpetual Bond)
He initially kept his sexuality from the Doctor and Steven as he believed that they would disapprove and force him to leave the TARDIS if they were to find out. After he had confessed his secret, though, Steven assured Oliver that the Doctor would do nothing of the sort. Furthermore, Steven told him that by his time, there was no longer any stigma attached to homosexuality and that same-sex relationships were common. (AUDIO: The Cold Equations)
He travelled to the planetoid Grace Alone as the Doctor saw in a database that they had been there. He was killed by the Vardans but remained as a ghost in the TARDIS. As a ghost, he witnessed the Doctor's regeneration into his second incarnation in Antarctica in December 1986. (AUDIO: The First Wave)
Behind the scenes
Oliver is arguably the earliest chronological non-heterosexual companion to the Doctor, from an in-universe point of view.