Yes you can, to some extent.
If the binary has a short period, then the chances are that the two stars have a different radial velocity. In other words, there are two sets of spectral lines in the spectrum. A cross-correlation or direct fitting technique can then pick the two stars out.
If the two stars are unresolved and have indistinguishable velocities (true for the majority of binaries), then it is more difficult. A fit to a single spectral template may be poor (and you could judge this from the chi-squared of the fit), but there needs to be a significant difference in the spectra of the two stars in order for a two-star model to adequately separate them.
There is basically a trade-off. You want the stars to be of similar brightness but to have quite different spectra. This is difficult to arrange for main sequence stars and there is normally a sweet-spot where one star is a bit cooler and a bit dimmer, but can still be seen in the combined spectra. Other combinations are easier - a hot white dwarf and an M dwarf for example have very similar luminosity but very different spectra, such that each dominates in different parts of the spectrum. Others are harder - a red giant and a main sequence star of lower mass.