In the default license generated by Game Maker for your games, some of YoYo Games stuff is mentioned. Are those necessary to be shipped with an application made with GM? Is it legally ok if I remove those and create my own license agreement, not mentioning Game Maker or YoYo Games in it?
tl;dr. Yes. That said:
This is not legal advice. You should seek clarification from a lawyer or from a representative of YoYo Games.
The Game Maker EULA, which you have presumably agreed to if you're using their software (unless you're using an older version to which this particular EULA does not apply, in which case you'll need to refer to it) indicates:
Both "Applications" and "Stand-Alone Applications" in this context are in reference to your games that have been produced using GameMaker. YoYo Games has provided a sample EULA, which I'm presuming is the "sample license" you're referring to, here.
What clause (i) above means is that you cannot remove references to YoYo Games or the fact that your game was created using their software. Specifically your end-user license agreement must call out all the rights that YoYo Games asserts in their EULA. You can see in the sample agreement that they do so by (among other things):
You are not required to use, word-for-word, the sample EULA. However, unless you consult a lawyer regarding modifications to the language or to the terms of the sample agreement, you could very easily violate the Game Maker EULA you agreed to, potentially opening yourself up to legal action.
Therefore I would recommend that you do not try to change the license unless you do so with the blessing of your lawyer.