The double point formula with isolated singularities and canonical embeddings