Tunable electronic, optical, and spintronic properties in InSe/MTe2 (M = Pd, Pt) van der Waals heterostructures