Despite their ubiquity in the Galaxy, M-type dwarfs have not been used to their fullest potential in Galactic archaeology studies, as compared to more massive FGK dwarfs and red giants. Due to their intrinsic faintness, the acquisition of high-resolution spectra of M dwarfs/subdwarfs demands large telescopes with long exposure times. The high-resolution spectroscopy of M-type dwarfs has therefore been limited to small samples of nearby stars mostly from the Galactic disk. On the other hand, the low-resolution spectra of these stars can be measured far into the disk, bulge and halo using more economically efficient observations. We present an improved analysis of low-resolution spectra to estimate the chemical parameters of M dwarfs/subdwarfs. We utilize the latest photometric calibrations reported in the literature to derive the main stellar parameters, i.e., effective temperature and surface gravity. The resulting parameters are then used in the model-fit process to determine metallicity [M/H] and alpha-element enhancement [alpha/Fe], using BT-Settl synthetic models and our computed spectra with the TurboSpectrum code and MARCS atmospheres. We show that non-monotonic variation of synthetic spectra relative to parameters in some spectral regions may cause systematic errors in resulting chemical parameters, due to inaccurate grid interpolation. To resolve this issue, we outline a routine to interpolate MARCS spectra aided by separately interpolating the normalized spectrum and continuum shape. We also investigate the degeneracy between [M/H] and [alpha/Fe] in fitting procedure that makes the determination of best-fit models challenging. In order to find the best representative model associated with the observed spectrum of interest, we suggest a quadratic fit over the minimization factor as a function of [M/H] or [alpha/Fe] within 10% of its minimum value. We then test our pipeline using mock spectra generated by synthetic models with various noise levels and spectral resolutions, which allows us to determine the accuracy of our technique. We finally apply our pipeline to ~20,000 low-resolution, optical spectra of M dwarfs and M subdwarfs collected at the MDM observatory, Lick Observatory, KPNO, and CTIO, as well as a subset from the SDSS spectroscopic archive. We find that the sample contains stars with metallicity and alpha-element enhancement values over the ranges -2.5 < [M/H] < +0.5 and 0.0 < [alpha/Fe] < +0.6, respectively. The precision of the determined chemical parameters is estimated by comparing the parameter values of the two components in the wide binaries identified in our sample.