I understand that they're soldiers for life. But I don't recall them taking an oath that bans this type of relationship. We were shown that they do have free time when Fives visits the clone bar.
In the show, there is no evidence of clones having a romantic relationship besides Cut Lawquane, but he did desert, so that negates him as an example. While there are no instances where a clone is reprimanded for having one, that does not mean that clones don't have romantic relationships.
But, due to the lack of examples or reference at all in the show, we can only assume that clones would not be allowed to have romantic relationships. This could be because of the same reasons that soldiers in our world cannot: they could be persuaded to give out information to a spy on accident or it would distract the soldiers from their duty.
Clone troopers were not programmed against relationships or were altered against physical relationships because the Kaminoans found that those that were made poorer troopers. However, most clones had a very limited chance to actually pursue any kind of relationship due to the demands of the war and the fact that clones weren't initially allowed leave, pay or much rest. Some Jedi commanders did go out of their way to give the clones more freedom and down time, and eventually petitioned for more equal treatment for their clone troops.
"Clone troopers were not paid at all and did not originally have leave privileges. There is no known regulation against marriage, but standard troops had such limited interaction with individuals outside of the army that romantic relationships were a rarity."
I hope this helps! Link to the star wars wiki below.