Ask an Immigration Solicitor. Get an Answer ASAP.
why would it be unsafe for your girlfriend to come over? On what basis are you expecting her to come over?
you should write the invitation letter as normal
Just a standard invitation letter confirming you will be providing accommodation and financial support and how long the invite is for.
My comments where suggestions
You cannot get married while on a visit visa