Is there a way to tell the apache (I guess) not to log the access to this file if its correct? (I'm sending a get with a password (always different) to this file.) The access to the file will be from different IPs. I don't want to stop all the logging, just the "approved" one.
No problem. Just look at the example from Apache's documentation (a place where you might want to look, if you happen to have an apache-related question in the future). For example:
# Mark requests for the AJAX call
SetEnvIf Request_URI "^/myajaxscript\.php.*$" dontlog
SetEnvIf Request_URI "^/myotherajaxscript\.php$" dontlog
# Log what remains
CustomLog logs/access_log common env=!dontlog