Speckle interferometry. III. High-resolution measurements of twelve close binary systems