requirements vary for each school. a general rule of thumb is to have 2 science LORs and 1 non-science LOR(as some schools require a non-science prof and most schools ask for at least 3 LORs). but some schools may not require a non-science LOR at all. i sent 5 LORs to my schools. some from science profs, 1 from my PI, one from my folklore prof, and 1 from a volunteer coordinator.
as far as asking for LORs...its always best to make sure the prof knows you(even if it is in a class of 200). best way to do that is to go to office hours frequently. or you can ask your research PI or volunteer coordinators since they will know you better. being from ucla i know how the large lectures go...but its not impossible to get to know your profs...you just have to make more of an effort(ie office hours!!!!).