If by 'safe' you mean "will it blow up anything" then the answer is probably no.
The worst is that it may not work as well as you expect if the different antenna increases the SWR. The range will be reduced on transmit.
Depending on the country, GSM frequencies are generally in the ranges of 810MHz, 850MHz, 900MHz and 1800MHz whereas the WiFi frequency is(as you have said) 2400MHz (to keep the units comparable).
As the frequency goes up, so the wave length and the length of a tuned antenna get shorter which is why AndreyG says to cut the length to turn a GSM antenna into a WiFi antenna.
However I understand that you want to do the opposite: turn a WiFI antenna into one for GSM. To do that you really should add loading coils to the antenna to effectively lengthen it. That could be more trouble than it is worth.
Susan