Search for charged Higgs bosons using the OPAL detector at LEP