Can optical fibre communication links be used for a length of 100km as
well as 100000km without having to change sender and receiver
In short, no. Any fiber run of decent length is going to require specialized high-power laser optics on both ends as well as some sort of in-line amplification. These days, EDFAs are typically used on very long-haul runs.
To clarify, short-haul runs and long-haul runs need different optics. If you tried to use short-haul optics on too long of a run, there will be too much attenuation and you'll never get link. Theoretically you could use long-haul optics on a shorter circuit, however you'd need optical attenuators on each end so you don't blow out the receivers.