Efficient shared segment protection in optical networks