Optical beat notes assisted attosecond soft X-ray pulse generation in high-gain free electron lasers