It's a fine point. If you use "on" with any subject, I don't think it could be faulted. Or you can avoid it with "He gave biology (or piano) lessons". Using this construct, you also avoid any ambiguity with e.g. "He gave lessons in French" or "He gave lessons on the piano".