End-to-end constellation shaping for fiber-terahertz integrated communications