I have learned that it is not proper to mention God’s name when one goes to the bathroom. What to do when one wants to perform the ablution, starting by saying Bismillah? 

As you said, it is not appropriate to mention God’s name when one is in the bathroom. If you are doing the ablution there, then do not mention God’s name. You can think of the words, without uttering them.
The ablution is valid without saying any prayer or phrases of praise of God. As long as one formulates the proper intention to perform the ablution and fulfill its requirements, his ablution is perfectly valid.