Under Roman law, Caesar and Cleopatra could not marry. Ancient Roman law stipulated that marriage was only possible between two Roman citizens. Although Cleopatra was Greek by birth and a naturalized Egyptian, neither counted under Roman law.
Caesar and Cleopatra's relationship actually lasted longer than is shown in the series. According to history, Caesar carried on with Cleopatra for 14 years; she visited Rome repeatedly, often staying in Caesar's own villa.