i totally agree with abe88. Let me just add to has been said:
1. A. think of the notes like they're all you've got in ur life!!!! this is during the first stages of practice only.
B. think of the sound, your movements..
2. when u miss a note/s in a passage, STOP! correct it right away! but make sure that you correct it five times or more so that u make the habit of playing the correct note/s. if you got something correct, don't stop right there and proceed to the next passage! make sure that u would be able to do the right thing again by practicing it more times perfectly. it's simple, if u repeated the wrong way five times and practiced the right way 3 times only, surely you'd make that mistake again.
3. repeat the process of number 1 after you've been playing the piece for some time already! it's good to review the theoretical part once in a while, even if you already think you know them.
one way of knowing if you've mastered the notes by heart: play the piece from beginning to end at an EXTREMELY SLOW TEMPO!!! why? coz when you seemingly dnt make any sense with the piece, that's when u find out that you really don't know the notes; also, play RH alone from beginning to end with the correct tempo, rhythm, rests are counted, then proceed with LH.

another way of doing it is by playing the whole piece on air or on a table.
why am i stressing mental practice here? coz you will find out that the real reason for missing notes is all in the brain. that's why they say that technique is all in the mind and not with the fingers. so stay focused during practice! (i posted "What are your worst distractions during practice?" hehehe...)
you should be able to remember how your hand moves for particular passages(muscle memory). u should remember how the sound goes (aural). u should remember how the keyboard looks like with u playing a piece (visual). and etc.
but of course, before all these, you should already have that perfect concept of the musical part in ur mind before commencing with the technical part--- because you will base your technical problems with how you want the piece to sound.
the habits that your teacher is saying is very true... once they've become habits, it is very difficult to undo because a habit is something you do without much thinking. (like for me, i wake up and go straight to the kitchen for coffee, never fails).
hope that helped. good luck to you! let us know...
crazy