You are probably thinking of J. Robert Oppenheimer quoting Paul Dirac in the first paragraph of an article entitled "The Age of Science 1900-1950", published in the September 1950 issue:
One evening more than 20 years ago Dirac, who was in Göttingen working on his
quantum theory of radiation, took me to task with characteristic gentleness.
"I understand," he said, "that you are writing poetry as well as working at
physics. I do not see how you can do both. In science one tries to say some
thing that no one knew before in a way that everyone can understand. Whereas
in poetry ..."
The 10 reports here, to which these words may serve as introduction, do
indeed attest that science says things that no one knew before in a way we
can all understand.
Oppenheimer had published poems in the Harvard student literary magazine Hound & Horn, including one from 1928 called "Crossing" inspired by his time in the desert of New Mexico.