William James Otto attended school in South Africa and then proceeded to Scotland where he matriculated at the University of Edinburgh. In 1856, at the age of 22, he qualified as Doctor of Medicine at the same university. His inaugural dissertation was entitled On the power inherent in the foetus in utero to resist disease. (Edinburgh, 1856, 36 pp). In 1856 he interrupted his medical studies to serve with a hospital corps in the Crimean War (1853-1856). He then continued his studies at a hospital in London and qualified as a Member of the Royal College of Surgeons (MRCS) of England. In 1858 he returned to the Cape Colony, where he was licensed to practice on 14 October that year. Subsequently he was also licensed to practice in Natal (May 1859) and the Transvaal (April 1867). He set up a practice in Pietermaritzburg, but was soon appointed district surgeon of Klip River County (Ladysmith), where he remained for five years. In 1863 he went to the Transvaal to become medical officer to the troops under Commandant-General S.J. Paul Kruger. The next year he was elected a member of the Volksraad for Marthinus Wessel Stroom (now Wakkerstroom), and later became landdrost of the district. In 1865 he was transferred to Potchestroom as landdrost, but was discharged in 1869, perhaps because his medical practice interfered with his official duties. He then returned to Natal as acting surgeon of Grey Hospital, Pietermaritzburg.
After the discovery of diamonds in Griqualand West Otto went there as a digger in 1871, but soon took up medical practice again. He remained in Kimberley for the rest of his life, except for a brief period as medical officer to the Boer forces during a campaign in Lesotho in 1880. As medical officer to the De Beers Company and breeder of race horses he became a well-known figure in the town. Early in 1882 Dr John D. Bird joined him in his practice. A controversy between Otto and Dr Leander S. Jameson, an associate of Cecil J. Rhodes, arose at this time. Jameson refused Otto's request to consult with him on a serious injury, stating that he and others had just formed the Griqualand West Medical Society and that one of its rules was that they did not consult with medical practitioners who were not members. Otto regarded it as his duty to inform the public of this attitude, with the result that the episode was published in full in the Grahamstown Journal. Otto and Bird did not join this controversial and short-lived society. Later that year Otto assisted the local Sanitary Board with preparations for an expected smallpox epidemic.
Otto made a minor contribution to physical anthropology by presenting one or more native skulls to the Alexander McGregor Memorial Museum (now the McGregor Museum) in Kimberley during 1909.