where in the bible is stated that before GOD made heavens and earth he had write a book with all the names of those who had been saved in it?
The Scripture to which you are referring is found in the book of the Revelation, but you appear to be not only misreading the Scripture, but assigning a meaning to it which does not fit.
Revelation 17:8 KJV
The beast that thou sawest was, and is not; and shall ascend out of the bottomless pit, and go into perdition: and they that dwell on the earth shall wonder, whose names were not written in the book of life from the foundation of the world, when they behold the beast that was, and is not, and yet is.
God " DID NOT PREDESTINATE WHO WOULD AND WHO WOULD NOT BE SAVED!"
The fact that the names were written in the Book Of Life at the foundation of the World is based on God's fore knowledge.
What I mean from that is that God is Pre-imminent (Always existed), All powerful, and all knowing.
It is the all knowing part that you seem to be misunderstanding. That is because God knew even before he created the Universe whether or not you would accept salvation or not, and he either wrote your name there before he created the World or left it out, He had to do it that way because He gives us free will and will not interfere with our choice.
That by no means is to say that he will not use what ever means he has to influence you, but He will not make you choose to follow him, that must be your choice.