Structural control of the optical properties of thin films of oligothiophenes