Yes, you can replace old OZD Profi P3, ... P4, ...G3, and ...G4 with the respective OZD Profi 12...
Make sure that you select the right variant depending on fiber type and number of fiber ports. Because the new devices support also faster data rates they must be configured to be compatible to the old ones. For this please read carefully the attached pdf document which describes how the DIP switches have to be set.