John Williams did not win an Oscar for writing the score of Fiddler on the Roof.
Williams’s first Oscar was indeed for Fiddler (1972 ceremony), but in the adaptation category. His first original score Oscar came later: Jaws (1975), Star Wars (1977), E.T. (1982), Schindler’s List (1993).
So: Williams won an Oscar for Fiddler (adaptation), but not for writing it. Bock & Harnick own the music/lyrics.