Recommendation Letter from a College Professor?

I would like to get a recommendation letter from a professor from UCLA, but a lot of things I’ve read on websites and the common app stress that the letter should come from a teacher from my school. Are there any precedents for getting letters of rec from college professors while you are in high school and is it allowed? Also, I aim to have this recommendation take up one of the two main recommendation slots in common app and not be in the other recommendations section.

If the professor taught you in an academic class, and can speak to your abilities, then it’s fine to submit. If you simply want to use a rec from a UCLA professor who did not teach you because it’s more prestigious in your eyes, don’t do it in lieu of the required teacher recommendations - nobody will be impressed.

Always choose the teachers who know you best and are best able to speak to your value, your intelligence, your abilities, your work ethic in their classes…

His title, his accomplishments-- they’re his resume and unrelated to what he has to say about you.