An Effective action for monopoles and knot solitons in Yang-Mills theory