Dear @Karym,
Welcome to the Wefugees Community and thank you for your question.
The platform and our experts are actually based in Germany, that is probably the reason for the rather late reply as we are unfortunately not familiar with Romanian laws and regulations.
However, I tried to make some research and found a quite interesting blog on the topic of marrying in Romania. I can not validate the sources/the author, but the shared information make a solid impression to me and you will find similar information on US embassy's website (in Romania), for instance.
If I understood correctly, the marriage process requires extensive documentation (birth certificate, passport, certificate of no-impediment etc.) and the blog is also mentioning a valid visa.
I hope this helps and all the best for you,
Meike