Reversible optical recording in trilayer structures