Use `null` for the optional accounts:

    await program.methods
      .updateAccount({num: 10})
      .accounts({
          payer: signer.publicKey,
          optionalAta: null
      })