Is it safe to use screws in subfloor-to-joist connection to eliminate floor squeak
Yes, that is perfectly fine and recommended.  Instead of Phillips-head stainless steel screws, I would actually recommend Deckmate decking screws that have torx heads (six-pronged star) so the driver bit has more grip. I have very bad experience with stripping Phillips heads.