Nonequilibrium growth of Si-III-V or Si-II-VI alloys is a promising approach to obtaining optically more active Si-based materials. We propose a new class of nonisovalent Si2AlP (or Si2ZnS) alloys in which the Al-P (or Zn-S) atomic chains are as densely packed as possible in the host Si matrix. As a hybrid of the lattice-matched parent phases, Si2AlP (or Si2ZnS) provides an ideal material system with tunable local chemical orders around Si atoms within the same composition and structural motif. Here, using first-principles hybrid functional calculations, we discuss how the local chemical orders affect the electronic and optical properties of the nonisovalent alloys.