Crystalline silicon is an indirect-bandgap semiconductor, making it an inefficient emitter of light. The successful integration of silicon-based electronics with optical components will therefore require optically active (for example, direct-bandgap) materials that can be grown on silicon with high-quality interfaces. For well ordered materials, this effectively translates into the requirement that such materials lattice-match silicon: lattice mismatch generally causes cracks and poor interface properties once the mismatched overlayer exceeds a very thin critical thickness. But no direct-bandgap semiconductor has yet been produced that can lattice-match silicon, and previously suggested structures pose formidable challenges for synthesis. Much recent work has therefore focused on introducing compliant transition layers between the mismatched components. Here we propose a more direct solution to integrating silicon electronics with optical components. We have computationally designed two hypothetical direct-bandgap semiconductor alloys, the synthesis of which should be possible through the deposition of specific group-IV precursor molecules and which lattice-match silicon to 0.5-1% along lattice planes with low Miller indices. The calculated bandgaps (and hence the frequency of emitted light) lie in the window of minimal absorption in current optical fibres.