Judge accepts soldier's pleas in Afghan massacre