How can I make self-studied course in undergraduate official when applying to graduate school?
I don't know much about Turkey, but in most systems there isn't really any way to get credit for a course you didn't take. 

You may be allowed to enrol on a course, skip all the lectures, and just turn up to the exam, depending on how strict your department is about attendance, but I wouldn't recommend it. 

Courses are taught in a certain way for a number of important reasons. University is not just about imparting knowledge, but also familiarising students with the norms of a field. Concepts may be introduced or explained in a way that seems silly to you for the sake of demonstrating some property or relating disparate concepts (like electromagnetism and gravity).

You may be unsatisfied with the mathematical rigour of your physics course, but this is deliberate and necessary. Most of the equations you will learn as an undergraduate are empirically derived (or derived under certain assumptions), and will probably prove to be inaccurate or incomplete later on. But they are useful, and teaching them "properly" would require bogging down first-year courses with complex and mostly-irrelevant mathematics. Imagine if, instead of stating Newton's third law, your lecturer had diverged for several lectures to discuss conservation of momentum, introduce Lagrangian mechanics, and prove Noether's theorem. 

You are, of course, encouraged to dig deeper. There is nothing better a student can do. But university courses are (usually) carefully designed to teach you important concepts and the "language" of the field in the simplest and most efficient way. 

And, uh, the lectures are what the exam will be based on. 

To get the grade on your transcript, you must enrol on the course and pass the exam. That probably means attending the lectures. It may not seem like it, but your lecturers know more about teaching their subject than you do.