Realization of deterministic 3-qubit quantum Toffoli gate with a single photon