Interaction between acoustically driven or laser-generated bubbles causes the bubble surfaces to deform. Dynamical equations describing the motion of two translating, nominally spherical bubbles undergoing small shape oscillations in a viscous liquid are derived using Lagrangian mechanics. Deformation of the bubble surfaces is taken into account by including quadrupole and octupole perturbations in the spherical-harmonic expansion of the boundary conditions on the bubbles. Quadratic terms in the quadrupole and octupole amplitudes are retained, and surface tension and shear viscosity are included in a consistent manner. A set of eight coupled second-order ordinary differential equations is obtained. Simulation results, obtained by numerical integration of the model equations, exhibit qualitative agreement with experimental observations by predicting the formation of liquid jets. Simulations also suggest that bubble-bubble interactions act to enhance surface mode instability.