Manipulation of entanglement sudden death in an all-optical setup